\(\int \frac {\tan (d (a+b \log (c x^n)))}{x} \, dx\) [162]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [F(-1)]
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 17, antiderivative size = 26 \[ \int \frac {\tan \left (d \left (a+b \log \left (c x^n\right )\right )\right )}{x} \, dx=-\frac {\log \left (\cos \left (a d+b d \log \left (c x^n\right )\right )\right )}{b d n} \]

[Out]

-ln(cos(a*d+b*d*ln(c*x^n)))/b/d/n

Rubi [A] (verified)

Time = 0.02 (sec) , antiderivative size = 26, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.059, Rules used = {3556} \[ \int \frac {\tan \left (d \left (a+b \log \left (c x^n\right )\right )\right )}{x} \, dx=-\frac {\log \left (\cos \left (a d+b d \log \left (c x^n\right )\right )\right )}{b d n} \]

[In]

Int[Tan[d*(a + b*Log[c*x^n])]/x,x]

[Out]

-(Log[Cos[a*d + b*d*Log[c*x^n]]]/(b*d*n))

Rule 3556

Int[tan[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-Log[RemoveContent[Cos[c + d*x], x]]/d, x] /; FreeQ[{c, d}, x]

Rubi steps \begin{align*} \text {integral}& = \frac {\text {Subst}\left (\int \tan (d (a+b x)) \, dx,x,\log \left (c x^n\right )\right )}{n} \\ & = -\frac {\log \left (\cos \left (a d+b d \log \left (c x^n\right )\right )\right )}{b d n} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.06 (sec) , antiderivative size = 25, normalized size of antiderivative = 0.96 \[ \int \frac {\tan \left (d \left (a+b \log \left (c x^n\right )\right )\right )}{x} \, dx=-\frac {\log \left (\cos \left (d \left (a+b \log \left (c x^n\right )\right )\right )\right )}{b d n} \]

[In]

Integrate[Tan[d*(a + b*Log[c*x^n])]/x,x]

[Out]

-(Log[Cos[d*(a + b*Log[c*x^n])]]/(b*d*n))

Maple [A] (verified)

Time = 0.20 (sec) , antiderivative size = 30, normalized size of antiderivative = 1.15

method result size
derivativedivides \(\frac {\ln \left (1+{\tan \left (d \left (a +b \ln \left (c \,x^{n}\right )\right )\right )}^{2}\right )}{2 n b d}\) \(30\)
default \(\frac {\ln \left (1+{\tan \left (d \left (a +b \ln \left (c \,x^{n}\right )\right )\right )}^{2}\right )}{2 n b d}\) \(30\)
parallelrisch \(\frac {\ln \left (1+{\tan \left (d \left (a +b \ln \left (c \,x^{n}\right )\right )\right )}^{2}\right )}{2 n b d}\) \(30\)
risch \(-i \ln \left (x \right )+\frac {2 i a}{n b}+\frac {2 i \ln \left (c \right )}{n}+\frac {2 i \ln \left (x^{n}\right )}{n}-\frac {\pi \,\operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2}}{n}+\frac {\pi \,\operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right ) \operatorname {csgn}\left (i c \right )}{n}+\frac {\pi \operatorname {csgn}\left (i c \,x^{n}\right )^{3}}{n}-\frac {\pi \operatorname {csgn}\left (i c \,x^{n}\right )^{2} \operatorname {csgn}\left (i c \right )}{n}-\frac {\ln \left (\left (x^{n}\right )^{2 i b d} c^{2 i b d} {\mathrm e}^{d \left (-b \pi \,\operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2}+b \pi \,\operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right ) \operatorname {csgn}\left (i c \right )+b \pi \operatorname {csgn}\left (i c \,x^{n}\right )^{3}-b \pi \operatorname {csgn}\left (i c \,x^{n}\right )^{2} \operatorname {csgn}\left (i c \right )+2 i a \right )}+1\right )}{b d n}\) \(238\)

[In]

int(tan(d*(a+b*ln(c*x^n)))/x,x,method=_RETURNVERBOSE)

[Out]

1/2/n/b/d*ln(1+tan(d*(a+b*ln(c*x^n)))^2)

Fricas [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 35, normalized size of antiderivative = 1.35 \[ \int \frac {\tan \left (d \left (a+b \log \left (c x^n\right )\right )\right )}{x} \, dx=-\frac {\log \left (\frac {1}{2} \, \cos \left (2 \, b d n \log \left (x\right ) + 2 \, b d \log \left (c\right ) + 2 \, a d\right ) + \frac {1}{2}\right )}{2 \, b d n} \]

[In]

integrate(tan(d*(a+b*log(c*x^n)))/x,x, algorithm="fricas")

[Out]

-1/2*log(1/2*cos(2*b*d*n*log(x) + 2*b*d*log(c) + 2*a*d) + 1/2)/(b*d*n)

Sympy [A] (verification not implemented)

Time = 1.40 (sec) , antiderivative size = 44, normalized size of antiderivative = 1.69 \[ \int \frac {\tan \left (d \left (a+b \log \left (c x^n\right )\right )\right )}{x} \, dx=\begin {cases} \log {\left (x \right )} \tan {\left (a d \right )} & \text {for}\: b = 0 \\0 & \text {for}\: d = 0 \\\log {\left (x \right )} \tan {\left (a d + b d \log {\left (c \right )} \right )} & \text {for}\: n = 0 \\- \frac {\log {\left (\cos {\left (a d + b d \log {\left (c x^{n} \right )} \right )} \right )}}{b d n} & \text {otherwise} \end {cases} \]

[In]

integrate(tan(d*(a+b*ln(c*x**n)))/x,x)

[Out]

Piecewise((log(x)*tan(a*d), Eq(b, 0)), (0, Eq(d, 0)), (log(x)*tan(a*d + b*d*log(c)), Eq(n, 0)), (-log(cos(a*d
+ b*d*log(c*x**n)))/(b*d*n), True))

Maxima [A] (verification not implemented)

none

Time = 0.21 (sec) , antiderivative size = 24, normalized size of antiderivative = 0.92 \[ \int \frac {\tan \left (d \left (a+b \log \left (c x^n\right )\right )\right )}{x} \, dx=\frac {\log \left (\sec \left ({\left (b \log \left (c x^{n}\right ) + a\right )} d\right )\right )}{b d n} \]

[In]

integrate(tan(d*(a+b*log(c*x^n)))/x,x, algorithm="maxima")

[Out]

log(sec((b*log(c*x^n) + a)*d))/(b*d*n)

Giac [F(-1)]

Timed out. \[ \int \frac {\tan \left (d \left (a+b \log \left (c x^n\right )\right )\right )}{x} \, dx=\text {Timed out} \]

[In]

integrate(tan(d*(a+b*log(c*x^n)))/x,x, algorithm="giac")

[Out]

Timed out

Mupad [B] (verification not implemented)

Time = 29.34 (sec) , antiderivative size = 38, normalized size of antiderivative = 1.46 \[ \int \frac {\tan \left (d \left (a+b \log \left (c x^n\right )\right )\right )}{x} \, dx=\ln \left (x\right )\,1{}\mathrm {i}-\frac {\ln \left ({\mathrm {e}}^{a\,d\,2{}\mathrm {i}}\,{\left (c\,x^n\right )}^{b\,d\,2{}\mathrm {i}}+1\right )}{b\,d\,n} \]

[In]

int(tan(d*(a + b*log(c*x^n)))/x,x)

[Out]

log(x)*1i - log(exp(a*d*2i)*(c*x^n)^(b*d*2i) + 1)/(b*d*n)